<div class="dmtin">
	<a href="#"><?= $catalogue->info[$lang]->name ?></a>
</div>
<div class="clear">
</div>
<div id="left_content">
	<? foreach ($data as $page) { ?>
		<div class="tin_tc">
			<a href="<?= url_create('site', 'ViewPage', 'index', $page->id, $page->title) ?>">
				<img width="170" height="116" src="<?= $page->thumb ?>">
			</a> 
			<a href="<?= url_create('site', 'ViewPage', 'index', $page->id, $page->title) ?>">
				<?= $page->title ?>
			</a>
			<br> 
			<?= $page->summary ?>
		</div>
		<div class="xt">
			<a href="<?= url_create('site', 'ViewPage', 'index', $page->id, $page->title) ?>">Xem tiếp</a>
		</div>
		<div class="clear">
		</div>    
		<div class="line">
		</div>
	<? } ?>
	<div class="item-list">
		<ul class="pager">

		</ul>
	</div>  
</div>
<script>
	$(document).ready(function() {
		function pagination_init(p)
		{
			var html = '<li class="first">' +
					'	<a href="javascript:;"><?= lang('first') ?></a>' +
					'</li>' +
					'<li class="previous">' +
					'	<a href="javascript:;"><?= lang('prev') ?></a>' +
					'</li>';
			for (var i in p.pnumbers) {
				if (p.pnumbers[i] == p.curr) {
					html += '<li class="pager-current">' +
							'	' + p.pnumbers[i] + '</a>' +
							'</li>';
				} else {
					html += '<li>' +
							'	<a href="javascript:;" data="' + p.pnumbers[i] + '">' + p.pnumbers[i] + '</a>' +
							'</li>';
				}
			}
			html += '<li class="next">' +
					'	<a href="javascript:;"><?= lang('next') ?></a>' +
					'</li>' +
					'<li class="last">' +
					'	<a href="javascript:;"><?= lang('last') ?></a>' +
					'</li>';
			$('.pager').html(html);
			$('.pager .first a').attr('data', p.first)
			$('.pager .prev  a').attr('data', p.prev)
			$('.pager .next  a').attr('data', p.next)
			$('.pager .last  a').attr('data', p.last)
		}
		var p = <?= json_encode($pagination) ?>;
		pagination_init(p);
	})
</script>
